package net.hn.hnms.biz.safety.trinity.until;

/**
 * @author 智呈物联 nzw
 * @date 2023/3/7
 */
public class Dictionaries {

    public static String DANGER_LEVEL_MANJOR = "重大";

    public static String DANGER_LEVEL_A = "A";

    public static String DANGER_LEVEL_B= "B";

    public static String DANGER_LEVEL_C = "C";

    public static String DANGER_STATE_CLOSEDLOOP = "已闭合";

    public static String DANGER_STATE_NOTCLOSEDLOOP = "'待五落实','待返单','待复查','待销号'";

    public static String RISK_LEVEL_MAJOR = "重大风险（一级）";

    public static String RISK_LEVEL_HIGHER = "较大风险（二级）";

    public static String RISK_LEVEL_GENERAL = "一般风险（三级）";

    public static String RISK_LEVEL_LOW = "低风险（四级）";

    public static String GAOTOUYAOMINECODE = "150621011038";

    public static String YANBEIMINECODE = "620824009734";

    private static String NOWMINECODE = "620824009734";

    public static void setNOWMINECODE(String NOWMINECODE) {
        Dictionaries.NOWMINECODE = NOWMINECODE;
    }

    private static void setDangerLevelManjor(String dangerLevelManjor) {
        DANGER_LEVEL_MANJOR = dangerLevelManjor;
    }

    private static void setDangerLevelA(String dangerLevelA) {
        DANGER_LEVEL_A = dangerLevelA;
    }

    private static void setDangerLevelB(String dangerLevelB) {
        DANGER_LEVEL_B = dangerLevelB;
    }

    private static void setDangerLevelC(String dangerLevelC) {
        DANGER_LEVEL_C = dangerLevelC;
    }

    private static void setDangerStateClosedloop(String dangerStateClosedloop) {
        DANGER_STATE_CLOSEDLOOP = dangerStateClosedloop;
    }

    private static void setDangerStateNotclosedloop(String dangerStateNotclosedloop) {
        DANGER_STATE_NOTCLOSEDLOOP = dangerStateNotclosedloop;
    }

    private static void setRiskLevelMajor(String riskLevelMajor) {
        RISK_LEVEL_MAJOR = riskLevelMajor;
    }

    private static void setRiskLevelHigher(String riskLevelHigher) {
        RISK_LEVEL_HIGHER = riskLevelHigher;
    }

    private static void setRiskLevelGeneral(String riskLevelGeneral) {
        RISK_LEVEL_GENERAL = riskLevelGeneral;
    }

    private static void setRiskLevelLow(String riskLevelLow) {
        RISK_LEVEL_LOW = riskLevelLow;
    }

    /**
     * 使用此方法切换各煤矿常量，默认值为研北
     * @param mineCode 煤矿编码
     */
    public static void setMineCode(String mineCode){
        if (NOWMINECODE.equals(mineCode)){
            return;
        }else if (mineCode!=null&&"".equals(mineCode)){
            setNOWMINECODE(mineCode);
        }

        if (YANBEIMINECODE.equals(mineCode)){

        }else if (GAOTOUYAOMINECODE.equals(mineCode)){
            setDangerLevelGaoTouYao();
            setDangerStateGaoTouYao();

//            setRiskLevelGaoTouYao();
        }
    }

    /**
     * 此方法切换高头窑隐患等级
     */
    private static void setDangerLevelGaoTouYao(){
        setDangerLevelManjor("1");
        setDangerLevelA("2");
        setDangerLevelB("3");
        setDangerLevelC("4");
    }

    /**
     * 此方法切换高头窑隐患状态
     */
    private static void setDangerStateGaoTouYao(){
        setDangerStateClosedloop("1");
        setDangerStateNotclosedloop("'0','2'");
    }

    private static void setRiskLevelGaoTouYao(){
        setRiskLevelMajor("4");
        setRiskLevelHigher("3");
        setRiskLevelGeneral("2");
        setRiskLevelLow("1");
    }
}
